package com.link510.nbiot.cmcc.domain.device;

import com.link510.nbiot.cmcc.config.Config;
import com.link510.nbiot.cmcc.domain.BaseDTO;
import lombok.*;

/**
 * @author cqnews
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class FindIMEIDeviceDTO implements BaseDTO {

    private static final long serialVersionUID = 8802420641974409321L;

    /**
     * imei
     */
    @Builder.Default
    private String imei = "";

    @Override
    public String toUrl() {

        StringBuilder url = new StringBuilder(Config.getApiUrl());
        url.append("/devices").append("/getbyimei?");
        url.append("imei=").append(imei);
        System.out.println(url);

        return url.toString();

    }
}
